package gameState;

import java.io.Serializable;

public class Player  implements Serializable{
	
	private static final long serialVersionUID = 1L;
	private String name;
	private String ip;
	private int port;
	private int id;
	
	public Player(){
		
	}
	
	public Player(String name, String ip, int port, int id){
		this.name=name;
		this.id=id;
		this.ip=ip;
		this.port=port;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public int getPort() {
		return port;
	}
//TODO problema quiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii	
	public boolean equalPlayer(Player p){
		//System.out.println("[Player || equalsPlayer()] P.getName"+p.getName()+" P.getId="+p.getId());
		//System.out.println("[Player || equalsPlayer()] this.getName"+this.getName()+" this.getId="+this.getId());
		if(p.getId() == this.id){
			return true;
		}else{
			return false;
		}
	}

}
